<?php
include(dirname(__FILE__) . "/get_result.php");

//$imagepath=("uploads/" . $_FILES["datei"]["name"]);
  $imagepath = $photo;
//set mime type content

header('Content-Type: image/jpeg');


//create original image

$image = imagecreatefromjpeg($imagepath);

//get image dimension

$dim=getimagesize($imagepath);


//Set thumb dimension

$thumbw = 207;
$thumbh = 166;

//create empty image

$thumb_image=imagecreatetruecolor($thumbw, $thumbh);

//Resize original image and copy it to thumb image

imagecopyresampled($thumb_image, $image, 0, 0, 0, 0,
					$thumbw, $thumbh, $dim[0], $dim[1]);


//display thumb image
imagejpeg($thumb_image);

?>
